{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# TensorFlow Tutorial #03-B\n",
    "# Layers API\n",
    "\n",
    "by [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org/)\n",
    "/ [GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials) / [Videos on YouTube](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## WARNING!\n",
    "\n",
    "**The Layers API was intended to be a basic builder API for creating Neural Networks in TensorFlow, but the Layers API was never fully completed. Although it still works in TensorFlow v. 1.9, it seems quite possible that it may be deprecated in the future. It is recommended that you use the more complete _Keras API_ instead, see Tutorial #03-C.**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction\n",
    "\n",
    "It is important to use a builder API when constructing Neural Networks in TensorFlow because it makes it easier to implement and modify the source-code. This also lowers the risk of bugs.\n",
    "\n",
    "Many of the other tutorials used the TensorFlow builder API called PrettyTensor for easy construction of Neural Networks. But there are several other builder APIs available for TensorFlow. PrettyTensor was used in these tutorials, because at the time in mid-2016, PrettyTensor was the most complete and polished builder API available for TensorFlow. But PrettyTensor is only developed by a single person working at Google and although it has some unique and elegant features, it is possible that it may become deprecated in the future.\n",
    "\n",
    "This tutorial is about a small builder API that has recently been added to TensorFlow version 1.1. It is simply called *Layers* or the *Layers API* or by its Python name `tf.layers`. This builder API is automatically installed as part of TensorFlow, so you no longer have to install a separate Python package as was needed with PrettyTensor.\n",
    "\n",
    "This tutorial is very similar to Tutorial #03 on PrettyTensor and shows how to implement the same Convolutional Neural Network using the Layers API. It is recommended that you are familiar with Tutorial #02 on Convolutional Neural Networks."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Flowchart"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following chart shows roughly how the data flows in the Convolutional Neural Network that is implemented below. See Tutorial #02 for a more detailed description of convolution."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![Flowchart](images/02_network_flowchart.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The input image is processed in the first convolutional layer using the filter-weights. This results in 16 new images, one for each filter in the convolutional layer. The images are also down-sampled using max-pooling so the image resolution is decreased from 28x28 to 14x14.\n",
    "\n",
    "These 16 smaller images are then processed in the second convolutional layer. We need filter-weights for each of these 16 channels, and we need filter-weights for each output channel of this layer. There are 36 output channels so there are a total of 16 x 36 = 576 filters in the second convolutional layer. The resulting images are also down-sampled using max-pooling to 7x7 pixels.\n",
    "\n",
    "The output of the second convolutional layer is 36 images of 7x7 pixels each. These are then flattened to a single vector of length 7 x 7 x 36 = 1764, which is used as the input to a fully-connected layer with 128 neurons (or elements). This feeds into another fully-connected layer with 10 neurons, one for each of the classes, which is used to determine the class of the image, that is, which number is depicted in the image.\n",
    "\n",
    "The convolutional filters are initially chosen at random, so the classification is done randomly. The error between the predicted and true class of the input image is measured as the so-called cross-entropy. The optimizer then automatically propagates this error back through the Convolutional Network using the chain-rule of differentiation and updates the filter-weights so as to improve the classification error. This is done iteratively thousands of times until the classification error is sufficiently low.\n",
    "\n",
    "These particular filter-weights and intermediate images are the results of one optimization run and may look different if you re-run this Notebook.\n",
    "\n",
    "Note that the computation in TensorFlow is actually done on a batch of images instead of a single image, which makes the computation more efficient. This means the flowchart actually has one more data-dimension when implemented in TensorFlow."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Imports"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "from sklearn.metrics import confusion_matrix\n",
    "import math"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This was developed using Python 3.6 (Anaconda) and TensorFlow version:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1.1.0'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tf.__version__"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load Data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The MNIST data-set is about 12 MB and will be downloaded automatically if it is not located in the given path."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting data/MNIST/train-images-idx3-ubyte.gz\n",
      "Extracting data/MNIST/train-labels-idx1-ubyte.gz\n",
      "Extracting data/MNIST/t10k-images-idx3-ubyte.gz\n",
      "Extracting data/MNIST/t10k-labels-idx1-ubyte.gz\n"
     ]
    }
   ],
   "source": [
    "from tensorflow.examples.tutorials.mnist import input_data\n",
    "data = input_data.read_data_sets('data/MNIST/', one_hot=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The MNIST data-set has now been loaded and consists of 70,000 images and associated labels (i.e. classifications of the images). The data-set is split into 3 mutually exclusive sub-sets. We will only use the training and test-sets in this tutorial."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Size of:\n",
      "- Training-set:\t\t55000\n",
      "- Test-set:\t\t10000\n",
      "- Validation-set:\t5000\n"
     ]
    }
   ],
   "source": [
    "print(\"Size of:\")\n",
    "print(\"- Training-set:\\t\\t{}\".format(len(data.train.labels)))\n",
    "print(\"- Test-set:\\t\\t{}\".format(len(data.test.labels)))\n",
    "print(\"- Validation-set:\\t{}\".format(len(data.validation.labels)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The class-labels are One-Hot encoded, which means that each label is a vector with 10 elements, all of which are zero except for one element. The index of this one element is the class-number, that is, the digit shown in the associated image. We also need the class-numbers as integers for the test-set, so we calculate it now."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "data.test.cls = np.argmax(data.test.labels, axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Data Dimensions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The data dimensions are used in several places in the source-code below. They are defined once so we can use these variables instead of numbers throughout the source-code below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# We know that MNIST images are 28 pixels in each dimension.\n",
    "img_size = 28\n",
    "\n",
    "# Images are stored in one-dimensional arrays of this length.\n",
    "img_size_flat = img_size * img_size\n",
    "\n",
    "# Tuple with height and width of images used to reshape arrays.\n",
    "img_shape = (img_size, img_size)\n",
    "\n",
    "# Number of colour channels for the images: 1 channel for gray-scale.\n",
    "num_channels = 1\n",
    "\n",
    "# Number of classes, one class for each of 10 digits.\n",
    "num_classes = 10"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function for plotting images"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Function used to plot 9 images in a 3x3 grid, and writing the true and predicted classes below each image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_images(images, cls_true, cls_pred=None):\n",
    "    assert len(images) == len(cls_true) == 9\n",
    "    \n",
    "    # Create figure with 3x3 sub-plots.\n",
    "    fig, axes = plt.subplots(3, 3)\n",
    "    fig.subplots_adjust(hspace=0.3, wspace=0.3)\n",
    "\n",
    "    for i, ax in enumerate(axes.flat):\n",
    "        # Plot image.\n",
    "        ax.imshow(images[i].reshape(img_shape), cmap='binary')\n",
    "\n",
    "        # Show true and predicted classes.\n",
    "        if cls_pred is None:\n",
    "            xlabel = \"True: {0}\".format(cls_true[i])\n",
    "        else:\n",
    "            xlabel = \"True: {0}, Pred: {1}\".format(cls_true[i], cls_pred[i])\n",
    "\n",
    "        # Show the classes as the label on the x-axis.\n",
    "        ax.set_xlabel(xlabel)\n",
    "        \n",
    "        # Remove ticks from the plot.\n",
    "        ax.set_xticks([])\n",
    "        ax.set_yticks([])\n",
    "    \n",
    "    # Ensure the plot is shown correctly with multiple plots\n",
    "    # in a single Notebook cell.\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot a few images to see if data is correct"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUMAAAD5CAYAAAC9FVegAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHihJREFUeJzt3XmUFNXZx/HvA0LYVQQFFWdOwAVCFBWDu0aBKCogccG4\nEGM0osEtAaNx1xglKBzRE7YD4QQNigKCUVFAEV8EJIIi4wYiCsRlhLggIsJ9/5i5XdUzPXtXVU/7\n+5zjmequ6qpnvPSdp27dxZxziIj80DVIOgARkVygylBEBFWGIiKAKkMREUCVoYgIoMpQRARQZSgi\nAqgyFBEBVBmKiACwS00ObtOmjSssLIwolNzzwQcfUFxcbEnHESeVcf5TGWdWo8qwsLCQZcuW1T6q\neqZ79+5JhxA7lXH+UxlnpttkERFUGYqIAKoMRUQAVYYiIoAqQxERoIZPk0Vqa8SIEQBs3boVgDfe\neAOAxx9/vNyxgwcPBuCoo44C4MILL4wjRPmBU2YoIoIyQ4nYueeeC8C0adMy7jcr3xd2zJgxAMyd\nOxeAE044AYD99tsvihAlQe+++y4ABx54IAAPPPAAAEOGDIk9FmWGIiIoM5QI+GwQKs4IDzroIABO\nOeU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JTdks45mlx84ELnfOfRlh3FJ92Srj9sD/mdnrwFJghnNubpSBazieiAi5\nlRmKiCRGlaGICKoMRUQAVYYiIoAqQxERQJWhiAigylBEBFBlKCICwP8D3P5bzM0W5d8AAAAASUVO\nRK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f633bf49e48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Get the first images from the test-set.\n",
    "images = data.test.images[0:9]\n",
    "\n",
    "# Get the true classes for those images.\n",
    "cls_true = data.test.cls[0:9]\n",
    "\n",
    "# Plot the images and labels using our helper-function above.\n",
    "plot_images(images=images, cls_true=cls_true)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## TensorFlow Graph\n",
    "\n",
    "The entire purpose of TensorFlow is to have a so-called computational graph that can be executed much more efficiently than if the same calculations were to be performed directly in Python. TensorFlow can be more efficient than NumPy because TensorFlow knows the entire computation graph that must be executed, while NumPy only knows the computation of a single mathematical operation at a time.\n",
    "\n",
    "TensorFlow can also automatically calculate the gradients that are needed to optimize the variables of the graph so as to make the model perform better. This is because the graph is a combination of simple mathematical expressions so the gradient of the entire graph can be calculated using the chain-rule for derivatives.\n",
    "\n",
    "TensorFlow can also take advantage of multi-core CPUs as well as GPUs - and Google has even built special chips just for TensorFlow which are called TPUs (Tensor Processing Units) and are even faster than GPUs.\n",
    "\n",
    "A TensorFlow graph consists of the following parts which will be detailed below:\n",
    "\n",
    "* Placeholder variables used for inputting data to the graph.\n",
    "* Variables that are going to be optimized so as to make the convolutional network perform better.\n",
    "* The mathematical formulas for the convolutional neural network.\n",
    "* A so-called cost-measure or loss-function that can be used to guide the optimization of the variables.\n",
    "* An optimization method which updates the variables.\n",
    "\n",
    "In addition, the TensorFlow graph may also contain various debugging statements e.g. for logging data to be displayed using TensorBoard, which is not covered in this tutorial."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Placeholder variables"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Placeholder variables serve as the input to the TensorFlow computational graph that we may change each time we execute the graph. We call this feeding the placeholder variables and it is demonstrated further below.\n",
    "\n",
    "First we define the placeholder variable for the input images. This allows us to change the images that are input to the TensorFlow graph. This is a so-called tensor, which just means that it is a multi-dimensional array. The data-type is set to `float32` and the shape is set to `[None, img_size_flat]`, where `None` means that the tensor may hold an arbitrary number of images with each image being a vector of length `img_size_flat`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = tf.placeholder(tf.float32, shape=[None, img_size_flat], name='x')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The convolutional layers expect `x` to be encoded as a 4-dim tensor so we have to reshape it so its shape is instead `[num_images, img_height, img_width, num_channels]`. Note that `img_height == img_width == img_size` and `num_images` can be inferred automatically by using -1 for the size of the first dimension. So the reshape operation is:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x_image = tf.reshape(x, [-1, img_size, img_size, num_channels])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Next we have the placeholder variable for the true labels associated with the images that were input in the placeholder variable `x`. The shape of this placeholder variable is `[None, num_classes]` which means it may hold an arbitrary number of labels and each label is a vector of length `num_classes` which is 10 in this case."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_true = tf.placeholder(tf.float32, shape=[None, num_classes], name='y_true')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We could also have a placeholder variable for the class-number, but we will instead calculate it using argmax. Note that this is a TensorFlow operator so nothing is calculated at this point."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_true_cls = tf.argmax(y_true, dimension=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## PrettyTensor Implementation\n",
    "\n",
    "This section shows the implementation of a Convolutional Neural Network using PrettyTensor taken from Tutorial #03 so it can be compared to the implementation using the Layers API below. This code has been enclosed in an `if False:` block so it does not run here.\n",
    "\n",
    "The basic idea is to wrap the input tensor `x_image` in a PrettyTensor object which has helper-functions for adding new computational layers so as to create an entire Convolutional Neural Network. This is a fairly simple and elegant syntax."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "if False:\n",
    "    x_pretty = pt.wrap(x_image)\n",
    "\n",
    "    with pt.defaults_scope(activation_fn=tf.nn.relu):\n",
    "        y_pred, loss = x_pretty.\\\n",
    "            conv2d(kernel=5, depth=16, name='layer_conv1').\\\n",
    "            max_pool(kernel=2, stride=2).\\\n",
    "            conv2d(kernel=5, depth=36, name='layer_conv2').\\\n",
    "            max_pool(kernel=2, stride=2).\\\n",
    "            flatten().\\\n",
    "            fully_connected(size=128, name='layer_fc1').\\\n",
    "            softmax_classifier(num_classes=num_classes, labels=y_true)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Layers Implementation\n",
    "\n",
    "We now implement the same Convolutional Neural Network using the Layers API that is included in TensorFlow version 1.1. This requires more code than PrettyTensor, although a lot of the following are just comments.\n",
    "\n",
    "We use the `net`-variable to refer to the last layer while building the Neural Network. This makes it easy to add or remove layers in the code if you want to experiment. First we set the `net`-variable to the reshaped input image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = x_image"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The input image is then input to the first convolutional layer, which has 16 filters each of size 5x5 pixels. The activation-function is the Rectified Linear Unit (ReLU) described in more detail in Tutorial #02."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.layers.conv2d(inputs=net, name='layer_conv1', padding='same',\n",
    "                       filters=16, kernel_size=5, activation=tf.nn.relu)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "One of the advantages of constructing neural networks in this fashion, is that we can now easily pull out a reference to a layer. This was more complicated in PrettyTensor.\n",
    "\n",
    "Further below we want to plot the output of the first convolutional layer, so we create another variable for holding a reference to that layer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "layer_conv1 = net"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We now do the max-pooling on the output of the convolutional layer. This was also described in more detail in Tutorial #02."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.layers.max_pooling2d(inputs=net, pool_size=2, strides=2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We now add the second convolutional layer which has 36 filters each with 5x5 pixels, and a ReLU activation function again."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.layers.conv2d(inputs=net, name='layer_conv2', padding='same',\n",
    "                       filters=36, kernel_size=5, activation=tf.nn.relu)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We also want to plot the output of this convolutional layer, so we keep a reference for later use."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "layer_conv2 = net"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The output of the second convolutional layer is also max-pooled for down-sampling the images."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "net = tf.layers.max_pooling2d(inputs=net, pool_size=2, strides=2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The tensors that are being output by this max-pooling are 4-rank, as can be seen from this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tf.Tensor 'max_pooling2d_2/MaxPool:0' shape=(?, 7, 7, 36) dtype=float32>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "net"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Next we want to add fully-connected layers to the Neural Network, but these require 2-rank tensors as input, so we must first flatten the tensors.\n",
    "\n",
    "The `tf.layers` API was first located in `tf.contrib.layers` before it was moved into TensorFlow Core. But even though it has taken the TensorFlow developers a year to move these fairly simple functions, they have somehow forgotten to move the even simpler `flatten()` function. So we still need to use the one in `tf.contrib.layers`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.contrib.layers.flatten(net)\n",
    "\n",
    "# This should eventually be replaced by:\n",
    "# net = tf.layers.flatten(net)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This has now flattened the data to a 2-rank tensor, as can be seen from this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tf.Tensor 'Flatten/Reshape:0' shape=(?, 1764) dtype=float32>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "net"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now add fully-connected layers to the neural network. These are called *dense* layers in the Layers API."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.layers.dense(inputs=net, name='layer_fc1',\n",
    "                      units=128, activation=tf.nn.relu)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We need the neural network to classify the input images into 10 different classes. So the final fully-connected layer has `num_classes=10` output neurons."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "net = tf.layers.dense(inputs=net, name='layer_fc_out',\n",
    "                      units=num_classes, activation=None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The output of the final fully-connected layer are sometimes called logits, so we have a convenience variable with that name."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "logits = net"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We use the softmax function to 'squash' the outputs so they are between zero and one, and so they sum to one."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_pred = tf.nn.softmax(logits=logits)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This tells us how likely the neural network thinks the input image is of each possible class. The one that has the highest value is considered the most likely so its index is taken to be the class-number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_pred_cls = tf.argmax(y_pred, dimension=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We have now created the exact same Convolutional Neural Network in a few lines of code that required many complex lines of code in the direct TensorFlow implementation.\n",
    "\n",
    "The Layers API is perhaps not as elegant as PrettyTensor, but it has some other advantages, e.g. that we can more easily refer to intermediate layers, and it is also easier to construct neural networks with branches and multiple outputs using the Layers API."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loss-Function to be Optimized"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To make the model better at classifying the input images, we must somehow change the variables of the Convolutional Neural Network.\n",
    "\n",
    "The cross-entropy is a performance measure used in classification. The cross-entropy is a continuous function that is always positive and if the predicted output of the model exactly matches the desired output then the cross-entropy equals zero. The goal of optimization is therefore to minimize the cross-entropy so it gets as close to zero as possible by changing the variables of the model.\n",
    "\n",
    "TensorFlow has a function for calculating the cross-entropy, which uses the values of the `logits`-layer because it also calculates the softmax internally, so as to to improve numerical stability."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "cross_entropy = tf.nn.softmax_cross_entropy_with_logits(labels=y_true, logits=logits)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We have now calculated the cross-entropy for each of the image classifications so we have a measure of how well the model performs on each image individually. But in order to use the cross-entropy to guide the optimization of the model's variables we need a single scalar value, so we simply take the average of the cross-entropy for all the image classifications."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "loss = tf.reduce_mean(cross_entropy)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Optimization Method\n",
    "\n",
    "Now that we have a cost measure that must be minimized, we can then create an optimizer. In this case it is the Adam optimizer with a learning-rate of 1e-4.\n",
    "\n",
    "Note that optimization is not performed at this point. In fact, nothing is calculated at all, we just add the optimizer-object to the TensorFlow graph for later execution."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "optimizer = tf.train.AdamOptimizer(learning_rate=1e-4).minimize(loss)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Classification Accuracy\n",
    "\n",
    "We need to calculate the classification accuracy so we can report progress to the user.\n",
    "\n",
    "First we create a vector of booleans telling us whether the predicted class equals the true class of each image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "correct_prediction = tf.equal(y_pred_cls, y_true_cls)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The classification accuracy is calculated by first type-casting the vector of booleans to floats, so that False becomes 0 and True becomes 1, and then taking the average of these numbers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Getting the Weights\n",
    "\n",
    "Further below, we want to plot the weights of the convolutional layers. In the TensorFlow implementation we had created the variables ourselves so we could just refer to them directly. But when the network is constructed using a builder API such as `tf.layers`, all the variables of the layers are created indirectly by the builder API. We therefore have to retrieve the variables from TensorFlow.\n",
    "\n",
    "First we need a list of the variable names in the TensorFlow graph:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<tf.Variable 'layer_conv1/kernel:0' shape=(5, 5, 1, 16) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv1/bias:0' shape=(16,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/kernel:0' shape=(5, 5, 16, 36) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/bias:0' shape=(36,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/kernel:0' shape=(1764, 128) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/bias:0' shape=(128,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/kernel:0' shape=(128, 10) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/bias:0' shape=(10,) dtype=float32_ref>\n",
      "<tf.Variable 'beta1_power:0' shape=() dtype=float32_ref>\n",
      "<tf.Variable 'beta2_power:0' shape=() dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv1/kernel/Adam:0' shape=(5, 5, 1, 16) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv1/kernel/Adam_1:0' shape=(5, 5, 1, 16) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv1/bias/Adam:0' shape=(16,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv1/bias/Adam_1:0' shape=(16,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/kernel/Adam:0' shape=(5, 5, 16, 36) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/kernel/Adam_1:0' shape=(5, 5, 16, 36) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/bias/Adam:0' shape=(36,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_conv2/bias/Adam_1:0' shape=(36,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/kernel/Adam:0' shape=(1764, 128) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/kernel/Adam_1:0' shape=(1764, 128) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/bias/Adam:0' shape=(128,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc1/bias/Adam_1:0' shape=(128,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/kernel/Adam:0' shape=(128, 10) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/kernel/Adam_1:0' shape=(128, 10) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/bias/Adam:0' shape=(10,) dtype=float32_ref>\n",
      "<tf.Variable 'layer_fc_out/bias/Adam_1:0' shape=(10,) dtype=float32_ref>\n"
     ]
    }
   ],
   "source": [
    "for var in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES):\n",
    "    print(var)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Each of the convolutional layers has two variables. For the first convolutional layer they are named `layer_conv1/kernel:0` and `layer_conv1/bias:0`. The `kernel` variables are the ones we want to plot further below.\n",
    "\n",
    "It is somewhat awkward to get references to these variables, because we have to use the TensorFlow function `get_variable()` which was designed for another purpose; either creating a new variable or re-using an existing variable. The easiest thing is to make the following helper-function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def get_weights_variable(layer_name):\n",
    "    # Retrieve an existing variable named 'kernel' in the scope\n",
    "    # with the given layer_name.\n",
    "    # This is awkward because the TensorFlow function was\n",
    "    # really intended for another purpose.\n",
    "\n",
    "    with tf.variable_scope(layer_name, reuse=True):\n",
    "        variable = tf.get_variable('kernel')\n",
    "\n",
    "    return variable"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Using this helper-function we can retrieve the variables. These are TensorFlow objects. In order to get the contents of the variables, you must do something like: `contents = session.run(weights_conv1)` as demonstrated further below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "weights_conv1 = get_weights_variable(layer_name='layer_conv1')\n",
    "weights_conv2 = get_weights_variable(layer_name='layer_conv2')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## TensorFlow Run"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Create TensorFlow session\n",
    "\n",
    "Once the TensorFlow graph has been created, we have to create a TensorFlow session which is used to execute the graph."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "session = tf.Session()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Initialize variables\n",
    "\n",
    "The variables for the TensorFlow graph must be initialized before we start optimizing them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "session.run(tf.global_variables_initializer())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function to perform optimization iterations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There are 55,000 images in the training-set. It takes a long time to calculate the gradient of the model using all these images. We therefore only use a small batch of images in each iteration of the optimizer.\n",
    "\n",
    "If your computer crashes or becomes very slow because you run out of RAM, then you may try and lower this number, but you may then need to do more optimization iterations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "train_batch_size = 64"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This function performs a number of optimization iterations so as to gradually improve the variables of the neural network layers. In each iteration, a new batch of data is selected from the training-set and then TensorFlow executes the optimizer using those training samples.  The progress is printed every 100 iterations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Counter for total number of iterations performed so far.\n",
    "total_iterations = 0\n",
    "\n",
    "def optimize(num_iterations):\n",
    "    # Ensure we update the global variable rather than a local copy.\n",
    "    global total_iterations\n",
    "\n",
    "    for i in range(total_iterations,\n",
    "                   total_iterations + num_iterations):\n",
    "\n",
    "        # Get a batch of training examples.\n",
    "        # x_batch now holds a batch of images and\n",
    "        # y_true_batch are the true labels for those images.\n",
    "        x_batch, y_true_batch = data.train.next_batch(train_batch_size)\n",
    "\n",
    "        # Put the batch into a dict with the proper names\n",
    "        # for placeholder variables in the TensorFlow graph.\n",
    "        feed_dict_train = {x: x_batch,\n",
    "                           y_true: y_true_batch}\n",
    "\n",
    "        # Run the optimizer using this batch of training data.\n",
    "        # TensorFlow assigns the variables in feed_dict_train\n",
    "        # to the placeholder variables and then runs the optimizer.\n",
    "        session.run(optimizer, feed_dict=feed_dict_train)\n",
    "\n",
    "        # Print status every 100 iterations.\n",
    "        if i % 100 == 0:\n",
    "            # Calculate the accuracy on the training-set.\n",
    "            acc = session.run(accuracy, feed_dict=feed_dict_train)\n",
    "\n",
    "            # Message for printing.\n",
    "            msg = \"Optimization Iteration: {0:>6}, Training Accuracy: {1:>6.1%}\"\n",
    "\n",
    "            # Print it.\n",
    "            print(msg.format(i + 1, acc))\n",
    "\n",
    "    # Update the total number of iterations performed.\n",
    "    total_iterations += num_iterations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function to plot example errors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Function for plotting examples of images from the test-set that have been mis-classified."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_example_errors(cls_pred, correct):\n",
    "    # This function is called from print_test_accuracy() below.\n",
    "\n",
    "    # cls_pred is an array of the predicted class-number for\n",
    "    # all images in the test-set.\n",
    "\n",
    "    # correct is a boolean array whether the predicted class\n",
    "    # is equal to the true class for each image in the test-set.\n",
    "\n",
    "    # Negate the boolean array.\n",
    "    incorrect = (correct == False)\n",
    "    \n",
    "    # Get the images from the test-set that have been\n",
    "    # incorrectly classified.\n",
    "    images = data.test.images[incorrect]\n",
    "    \n",
    "    # Get the predicted classes for those images.\n",
    "    cls_pred = cls_pred[incorrect]\n",
    "\n",
    "    # Get the true classes for those images.\n",
    "    cls_true = data.test.cls[incorrect]\n",
    "    \n",
    "    # Plot the first 9 images.\n",
    "    plot_images(images=images[0:9],\n",
    "                cls_true=cls_true[0:9],\n",
    "                cls_pred=cls_pred[0:9])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function to plot confusion matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_confusion_matrix(cls_pred):\n",
    "    # This is called from print_test_accuracy() below.\n",
    "\n",
    "    # cls_pred is an array of the predicted class-number for\n",
    "    # all images in the test-set.\n",
    "\n",
    "    # Get the true classifications for the test-set.\n",
    "    cls_true = data.test.cls\n",
    "    \n",
    "    # Get the confusion matrix using sklearn.\n",
    "    cm = confusion_matrix(y_true=cls_true,\n",
    "                          y_pred=cls_pred)\n",
    "\n",
    "    # Print the confusion matrix as text.\n",
    "    print(cm)\n",
    "\n",
    "    # Plot the confusion matrix as an image.\n",
    "    plt.matshow(cm)\n",
    "\n",
    "    # Make various adjustments to the plot.\n",
    "    plt.colorbar()\n",
    "    tick_marks = np.arange(num_classes)\n",
    "    plt.xticks(tick_marks, range(num_classes))\n",
    "    plt.yticks(tick_marks, range(num_classes))\n",
    "    plt.xlabel('Predicted')\n",
    "    plt.ylabel('True')\n",
    "\n",
    "    # Ensure the plot is shown correctly with multiple plots\n",
    "    # in a single Notebook cell.\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function for showing the performance"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Below is a function for printing the classification accuracy on the test-set.\n",
    "\n",
    "It takes a while to compute the classification for all the images in the test-set, that's why the results are re-used by calling the above functions directly from this function, so the classifications don't have to be recalculated by each function.\n",
    "\n",
    "Note that this function can use a lot of computer memory, which is why the test-set is split into smaller batches. If you have little RAM in your computer and it crashes, then you can try and lower the batch-size."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Split the test-set into smaller batches of this size.\n",
    "test_batch_size = 256\n",
    "\n",
    "def print_test_accuracy(show_example_errors=False,\n",
    "                        show_confusion_matrix=False):\n",
    "\n",
    "    # Number of images in the test-set.\n",
    "    num_test = len(data.test.images)\n",
    "\n",
    "    # Allocate an array for the predicted classes which\n",
    "    # will be calculated in batches and filled into this array.\n",
    "    cls_pred = np.zeros(shape=num_test, dtype=np.int)\n",
    "\n",
    "    # Now calculate the predicted classes for the batches.\n",
    "    # We will just iterate through all the batches.\n",
    "    # There might be a more clever and Pythonic way of doing this.\n",
    "\n",
    "    # The starting index for the next batch is denoted i.\n",
    "    i = 0\n",
    "\n",
    "    while i < num_test:\n",
    "        # The ending index for the next batch is denoted j.\n",
    "        j = min(i + test_batch_size, num_test)\n",
    "\n",
    "        # Get the images from the test-set between index i and j.\n",
    "        images = data.test.images[i:j, :]\n",
    "\n",
    "        # Get the associated labels.\n",
    "        labels = data.test.labels[i:j, :]\n",
    "\n",
    "        # Create a feed-dict with these images and labels.\n",
    "        feed_dict = {x: images,\n",
    "                     y_true: labels}\n",
    "\n",
    "        # Calculate the predicted class using TensorFlow.\n",
    "        cls_pred[i:j] = session.run(y_pred_cls, feed_dict=feed_dict)\n",
    "\n",
    "        # Set the start-index for the next batch to the\n",
    "        # end-index of the current batch.\n",
    "        i = j\n",
    "\n",
    "    # Convenience variable for the true class-numbers of the test-set.\n",
    "    cls_true = data.test.cls\n",
    "\n",
    "    # Create a boolean array whether each image is correctly classified.\n",
    "    correct = (cls_true == cls_pred)\n",
    "\n",
    "    # Calculate the number of correctly classified images.\n",
    "    # When summing a boolean array, False means 0 and True means 1.\n",
    "    correct_sum = correct.sum()\n",
    "\n",
    "    # Classification accuracy is the number of correctly classified\n",
    "    # images divided by the total number of images in the test-set.\n",
    "    acc = float(correct_sum) / num_test\n",
    "\n",
    "    # Print the accuracy.\n",
    "    msg = \"Accuracy on Test-Set: {0:.1%} ({1} / {2})\"\n",
    "    print(msg.format(acc, correct_sum, num_test))\n",
    "\n",
    "    # Plot some examples of mis-classifications, if desired.\n",
    "    if show_example_errors:\n",
    "        print(\"Example errors:\")\n",
    "        plot_example_errors(cls_pred=cls_pred, correct=correct)\n",
    "\n",
    "    # Plot the confusion matrix, if desired.\n",
    "    if show_confusion_matrix:\n",
    "        print(\"Confusion Matrix:\")\n",
    "        plot_confusion_matrix(cls_pred=cls_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Performance before any optimization\n",
    "\n",
    "The accuracy on the test-set is very low because the variables for the neural network have only been initialized and not optimized at all, so it just classifies the images randomly."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy on Test-Set: 5.8% (577 / 10000)\n"
     ]
    }
   ],
   "source": [
    "print_test_accuracy()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Performance after 1 optimization iteration\n",
    "\n",
    "The classification accuracy does not improve much from just 1 optimization iteration, because the learning-rate for the optimizer is set very low."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimization Iteration:      1, Training Accuracy:   9.4%\n"
     ]
    }
   ],
   "source": [
    "optimize(num_iterations=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy on Test-Set: 6.6% (659 / 10000)\n"
     ]
    }
   ],
   "source": [
    "print_test_accuracy()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Performance after 100 optimization iterations\n",
    "\n",
    "After 100 optimization iterations, the model has significantly improved its classification accuracy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 368 ms, sys: 56 ms, total: 424 ms\n",
      "Wall time: 308 ms\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "optimize(num_iterations=99) # We already performed 1 iteration above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy on Test-Set: 81.2% (8125 / 10000)\n",
      "Example errors:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAU0AAAD5CAYAAACj3GcTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu81XO+x/HXh1BCqUQPqm2OpDDkVJJLhBpyKZdCxmUU\n0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xsAYk/7luC7R2ANVmkcRzwv8A8M1sE3EUi2p4ILCNRON8LzPAH1NKmeT3Q\nDBhniSESuayGlqqc5HHQMXAZid7KJcADzrn3g49/SqJHva5uABpbYljSYhL5BIne+uZm9i5wHYnq\nIkE6a2rTHGZmi8xsPjCERNt1fZfL+3hSsO8kYIhz7utgeyndx7GV1WOUZvYMcHIehpVICbBEHek5\n59zPip0WyZ9yv4/LqtAUESk2PUYpIhKDCk0RkRhUaIqIxKBCU0QkBhWaIiIxqNAUEYlBhaaISAz/\nD2mCwyX2kvPaAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339b686d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_test_accuracy(show_example_errors=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Performance after 1000 optimization iterations\n",
    "\n",
    "After 1000 optimization iterations, the model has greatly increased its accuracy on the test-set to more than 90%."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimization Iteration:    101, Training Accuracy:  89.1%\n",
      "Optimization Iteration:    201, Training Accuracy:  89.1%\n",
      "Optimization Iteration:    301, Training Accuracy:  90.6%\n",
      "Optimization Iteration:    401, Training Accuracy:  90.6%\n",
      "Optimization Iteration:    501, Training Accuracy:  89.1%\n",
      "Optimization Iteration:    601, Training Accuracy:  93.8%\n",
      "Optimization Iteration:    701, Training Accuracy:  92.2%\n",
      "Optimization Iteration:    801, Training Accuracy:  92.2%\n",
      "Optimization Iteration:    901, Training Accuracy:  98.4%\n",
      "CPU times: user 3.55 s, sys: 500 ms, total: 4.05 s\n",
      "Wall time: 2.96 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "optimize(num_iterations=900) # We performed 100 iterations above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy on Test-Set: 94.5% (9455 / 10000)\n",
      "Example errors:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAU0AAAD5CAYAAACj3GcTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8VfP+x/HXJyUNShoIpUyJEDeVUG4osxB1r66pdLuS\nTNdwXRkurtu9VLgyRKiMNzIPITJTigZDMpQhigg/JH1/f+z13Wvt0+nsvc6eT+/n43EeZ+29v2ut\n7znfvb/7s77rO5hzDhERyUytYmdARKScqNIUEYlBlaaISAyqNEVEYlClKSISgypNEZEYVGmKiMSg\nSlNEJAZVmiIiMdTOZudmzZq5Nm3a5Cgr5WHmzJnLnHPNi52PQlEZ13wq43iyqjTbtGnDjBkzsjlE\n2TGzT4qdh0JSGdd8KuN4dHkuIhKDKk0RkRhUaYqIxKBKU0QkBlWaIiIxqNIUEYlBlaaISAxZ9dOs\njh9++AGAxYsXAzB27Ng10px00kkAdOzYsXAZk4L69ttvAWjUqBEAtWrp+1vKg96pIiIxFCzS9BHm\nv//9bwD+8Y9/rDXtDTfcAEC/fv0AGDNmDAAbb7xxPrMoBXT00UcD0KBBAwAGDRoEwCGHHJKX8331\n1VdA+B6qXbvgF1lSQyjSFBGJoWBft1dccQUAV155Zdq0q1atAmDSpEkAPPPMMwDcdtttAPTq1SsP\nOZRC2m233QAYOXIkAD169Mjr+UaPHg3Ar7/+CoRXPJIbV111VXL7nnvuAeCNN95ISbPzzjsDMGrU\nKAB69uxZoNzlliJNEZEYChZptm3bNuWxmQFw6qmnJp/bcccdAVi5ciUAI0aMAGDJkiUAHH744QCc\ne+65yX3OOeccAOrXr5+PbEuetGrVqiDnmTp1KgBXX301AL/88gugSDNbPmI/+eSTAXjyySeTrw0c\nOBCA+++/H4BXX30VCD+3EyZMABRpioisEwoWaT7wwAMpj4855hggvDNemV122QWAI488EoCvv/4a\ngEsvvTSZZuHChQDceuutANSpUydHOZZ8uv766wtynmnTpgFhhOnbUiU7PtK8/fbbAXj33XeTr7Vr\n1y4lbd++fQH44IMPgLBNs1wp0hQRiUGVpohIDAW7PH/88ceB8AbQBRdckHafvffeG4AHH3wQgPPP\nPx+AF154IZnGd0tyzgFhtyR1Xi5Nc+fOBeDzzz8vyPmefvrplMcXXXRRQc5b06233noAtGzZEoDm\nzdMvt3PssccC4ef4ueeeS762zz775DaDeaRIU0QkhoKFY/vttx8QdlRv2LBhxvt269YNCDtCH3TQ\nQcnXli9fDsCdd94JwGGHHQaEN5qktLzyyisAfPfddynP++GUueJv/PgbFvXq1QOge/fuOT3Puqpu\n3bpA+HmuTpe/Tz4pz/XrFGmKiMRQsEizffv2QPjNVJlx48YBYdT45z//udJ0f/zjH5Pb//3vf1Ne\ne//997PKp+Sen6wFUofbARxxxBEADB48OKfn9O3gs2fPTjn+RhttlNPzrOv85zoTPvovd4o0RURi\nKFik2alTp5THb7/9NgA///xz8jk/pNIPo4zeXcvULbfcAsD2228PwP777598rXHjxrGPJ9k744wz\nktvvvfdeymv5upvtBztI6bj77rtTHrdp06Y4GcmSIk0RkRgKFmn26dMHgDvuuAMIB+t/+eWXyTQb\nbLABEEaa1eHvyPm759G7ejfffDMQTvyhST7y66GHHgLgvvvuW+M1H2VUHHKXLX9XPvq+ktLgh0Hv\nscceQP6nA8wXRZoiIjEULNL0C2gNGDAg5flof82JEycCYWTyzTffAPDoo49W+7z/93//l9z2IxJ2\n2mknIBxN1KFDh2ofX9a0YsUKIFzSpGKfTAgncPFXF7ny0UcfAeFdc89PVyaF53u0+M+3HxFUrhRp\niojEoEpTRCSGkprVwq9E6H//9ttvAHz//fcp6aKN/H4CkBYtWqSk8V1Zol1PfvzxRwDmzJkDwFln\nnQXAv/71L0DrrOeKX/lxxowZa7zmO7P7JpJCadq0aUHPJyHflXDZsmVAeJn+yCOPJNP4QQd+JYau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QmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339b68b00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_test_accuracy(show_example_errors=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Performance after 10,000 optimization iterations\n",
    "\n",
    "After 10,000 optimization iterations, the model has a classification accuracy on the test-set of about 99%."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimization Iteration:   1001, Training Accuracy:  92.2%\n",
      "Optimization Iteration:   1101, Training Accuracy:  92.2%\n",
      "Optimization Iteration:   1201, Training Accuracy:  92.2%\n",
      "Optimization Iteration:   1301, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   1401, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   1501, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   1601, Training Accuracy:  93.8%\n",
      "Optimization Iteration:   1701, Training Accuracy:  92.2%\n",
      "Optimization Iteration:   1801, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   1901, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   2001, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   2101, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   2201, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   2301, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   2401, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   2501, Training Accuracy:  93.8%\n",
      "Optimization Iteration:   2601, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   2701, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   2801, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   2901, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   3001, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   3101, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   3201, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   3301, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   3401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   3501, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   3601, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   3701, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   3801, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   3901, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4001, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4101, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   4201, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4301, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4401, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4501, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   4601, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   4701, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4801, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   4901, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5001, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   5101, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   5201, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5301, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5501, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   5601, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5701, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   5801, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   5901, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   6001, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   6101, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   6201, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   6301, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   6401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   6501, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   6601, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   6701, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   6801, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   6901, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7001, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7101, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7201, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7301, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   7401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7501, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   7601, Training Accuracy:  93.8%\n",
      "Optimization Iteration:   7701, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   7801, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   7901, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8001, Training Accuracy:  95.3%\n",
      "Optimization Iteration:   8101, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   8201, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   8301, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8501, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   8601, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8701, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8801, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   8901, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9001, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   9101, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   9201, Training Accuracy:  96.9%\n",
      "Optimization Iteration:   9301, Training Accuracy:  98.4%\n",
      "Optimization Iteration:   9401, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9501, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9601, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9701, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9801, Training Accuracy: 100.0%\n",
      "Optimization Iteration:   9901, Training Accuracy: 100.0%\n",
      "CPU times: user 34.6 s, sys: 4.08 s, total: 38.7 s\n",
      "Wall time: 28.2 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "optimize(num_iterations=9000) # We performed 1000 iterations above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy on Test-Set: 98.8% (9884 / 10000)\n",
      "Example errors:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAU0AAAD5CAYAAACj3GcTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe4FdW9//H3F1EBsYOCSok/pSixi4qKBWNXsAVCDIJB\nTLBAvLZYErkCtthIxBoRRb15EBSUq8YS8EIUBUG6YiWgKBgBEUvU9ftjZu2Zfdrec3Y/fF7Pw3Nm\nz57y5ayz1/7OmjVrmXMOERHJTqNSByAiUklUaYqIJKBKU0QkAVWaIiIJqNIUEUlAlaaISAKqNEVE\nElClKSKSgCpNEZEEGueyc4sWLVz79u3zFEplmD179mrnXMtSx1EsKuOGT2WcTE6VZvv27Zk1a1Yu\nh6g4ZvZRqWMoJpVxw6cyTkaX5yIiCajSFBFJQJWmiEgCqjRFRBJQpSkikkBOd89FRPLhnXfeAeD8\n888HoG/fvgCcd955JYupNso0RUQSKOtMc/369QA88cQTtW4zY8YMAP76178C0KtXLwAGDRoEwPHH\nH1/IEEWknnx2CXDSSScB8P777wPw4YcfAso0RUQqXllmmj7DvOSSSwB46aWXAOjcuTMA22+/fbV9\nfEY5bdq0tJ933nlnapuzzz67QBGLSLb8Z/KOO+5IrVu2bFnaNu3atStqTEko0xQRSaAsM813330X\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rllPYJpzbm0WMVaagpZxPRS7jE8EXido\nSugAPGdmP83y77FSFPpz3AQ4Cbgky3iK/jl2zj0BPGFmRwHXh8evVS6V5lex5R8J2kS8JrFlA7o6\n577L9sAWNE5PBMY45yZnudujzrmhNayPx2nAYOfcS1XOl8uQ8H2AR3LYv5wVrIzrqdhlPAC4Lswu\n3zazfxFUnm/W41jlqtBlfBIw0zm3OsvtS/U5xjn3DwtuUG7jnFtT23Z56XIU1uxfmNnuZtaI4MaI\n9yJwgX9hZvvUdSwLvlYeIrhBMKrKe0PMLJdLveeBwf4yxMw6mllT4BWgd9gmsjNBZpGRmW0LdAOe\nziGmipDPMq5LmZXxMqBHeJzWwG7ABznEVtYKVMbV2vvLqYzDdl0Llw8guClUa4UJ+e2neQXBf+af\nQLzB9wLg0LDBdhFh25+ZHWRm99RwnCMIftE/s6i7wnHhe52Bz3OI8V5gKTDXzBYAdxNk208QfEAW\nAWOAV/0OZjbCzGpr5zgDeNY593UOMVWSfJUxZjYe+D9gDzNbbmb9w7fKqYyvA44ws3nACwR3nb/I\nIbZKkM8y3hI4CniqylvlVMY/BxZY0PVtFNA708kr6jFKM5sC9HTOfV/qWKQwVMYNX6WXcUVVmiIi\npabHKEVEElClKSKSgCpNEZEEVGmKiCSgSlNEJAFVmiIiCajSFBFJ4P8DvJniUZggGdAAAAAASUVO\nRK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339eaa780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Confusion Matrix:\n",
      "[[ 975    0    0    0    0    1    2    1    1    0]\n",
      " [   0 1127    2    0    0    0    2    2    2    0]\n",
      " [   2    0 1024    1    1    0    0    4    0    0]\n",
      " [   0    0    0 1006    0    1    0    1    2    0]\n",
      " [   0    0    1    0  979    0    1    0    0    1]\n",
      " [   2    0    0    7    0  879    3    0    1    0]\n",
      " [   5    2    0    1    1    3  946    0    0    0]\n",
      " [   0    1    4    2    0    0    0 1018    1    2]\n",
      " [   1    0    3   10    1    1    1    2  951    4]\n",
      " [   1    3    0    6    8    4    0    6    2  979]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARIAAAD3CAYAAADRydumAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGrdJREFUeJzt3XuwXWWd5vHvQwKEm9xlIMEGGxqlmRYwhVFaSonQigxg\nj23BjIoO1cz00Apqj2L31DDt9MzotONtuodqGlBsES8BypTaXMQL7ZSkgRC5BSGAQGIgIBERFEjO\nM3+s98gmJifr7LXW2ZfzfKpWnb3XXvt9330uv/O+73rXb8k2ERFNbDPoBkTE6EsgiYjGEkgiorEE\nkohoLIEkIhpLIImIxhJIIqKxBJKIaCyBJCIaSyCJiMbmDroBEbPZH7x+J//08Y21jr351meutv3G\njpvUlwSSiAF67PGNLLt6Qa1jt9333r06bk7fEkgiBsps9MSgG9FYAknEABmYYPSvwE8giRggY55z\nvTmSYTYyZ20kvVHSjyStknRun2VcLGmdpNsbtmV/Sd+RdKekOySd3Wc58yT9s6QflnL+skGb5ki6\nRdLXG5TxY0m3SVoh6aYG5ewmaYmkuyStlPTqPso4pLRjcvu5pHP6bM/7yvf3dkmXSZrXZzlnlzLu\n6LctmzOBa23DbCQCiaQ5wN8CbwIOBU6TdGgfRX0OaGPWewPwAduHAouAs/pszzPAsbZfARwOvFHS\noj7bdDawss/39nq97cNtL2xQxqeBq2y/DHhFP+2y/aPSjsOBVwJPA1dOtxxJ84H3AgttHwbMAU7t\no5zDgD8GjqL6TCdKOmi65WzKwEZcaxtmIxFIqH54q2zfZ/tZ4EvAydMtxPb1wONNG2N7re3l5fGT\nVH8o8/sox7Z/UZ5uW7Zp/8ZIWgC8Gbhwuu9tm6RdgWOAiwBsP2v7Zw2LXQzca/uBPt8/F9hB0lxg\nR+AnfZTxcmCZ7adtbwC+B/xhn+15gfRIZs584KGe56vp4w+3C5IO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18FUw5wbJO0F/GfgDbafkvQh\n4P2S/hfw98CxVNnBv7yF4j8DfM/2WyTNAXamuifsYbYPL/UfX+o8iiqp8FJJx1DllzkVOJzqd2g5\ncHO7n36WsGHjb6TpGTkJJMNph57bCfwT1b1K9gMeKPdohSolw6HA/yt3UtsO+AHwMuB+2/cASPoC\nJXHUJo4F3glgeyPwxORd6nscX7ZbyvOdqQLLLsCVk/M2kpY2+rSz3ZD3NupIIBlOv5zsFUwqweKp\n3l3AtbZP2+S4F7yvIQH/0/bfbVJH7gjQpjEIJJkjGV03AEdPZuaXtJOk3wHuAg6Q9NvluC2dErgO\n+JPy3jmSdgWepOptTLoa+Hc9cy/zJb0YuB44RdIOknYB/lXLn20WcXWtTZ1tiCWQjCjbjwLvAi6T\ndCtlWGP7V1RDmW+UydZ1WyjibOD1km6jmt841PZPqYZKt0v6a9vXAF8EflCOWwLsYns51dzLD4F/\nBG7s7IOOO4M9UWsbZllHEjFAu87d269+0Sm1jr16/YVDu44kcyQRgzYG/8wTSCIGKad/I6INTvLn\niGhm+Fet1pFAEjFIY5JqMad/IwbNE/W2Gsp1Vj+StErSuR23/NfSI4kYIANuqUdSrpn6W+A4YDVw\no6Sltu9spYIppEcSMUh2mz2So4BVtu+z/SzwJeDkTttfpEcSMWBu7/TvfOChnuergVe1VfhUEkgi\nBuhJ1l/9LS/Zq+bh8yTd1PP8Atvtp37sQwJJxADZfmOLxa0B9u95vqDs61zmSCLGx43AwZIOlLQd\nVfKpGckVkx5JxJiwvUHSn1Klf5gDXGz7jpmoO1f/RkRjGdpERGMJJBHRWAJJRDSWQBIRjSWQRERj\nCSQR0VgCSUQ0lkASEY39f3WS57bNTBYlAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f633bf49470>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_test_accuracy(show_example_errors=True,\n",
    "                    show_confusion_matrix=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Visualization of Weights and Layers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function for plotting convolutional weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_conv_weights(weights, input_channel=0):\n",
    "    # Assume weights are TensorFlow ops for 4-dim variables\n",
    "    # e.g. weights_conv1 or weights_conv2.\n",
    "    \n",
    "    # Retrieve the values of the weight-variables from TensorFlow.\n",
    "    # A feed-dict is not necessary because nothing is calculated.\n",
    "    w = session.run(weights)\n",
    "\n",
    "    # Get the lowest and highest values for the weights.\n",
    "    # This is used to correct the colour intensity across\n",
    "    # the images so they can be compared with each other.\n",
    "    w_min = np.min(w)\n",
    "    w_max = np.max(w)\n",
    "\n",
    "    # Number of filters used in the conv. layer.\n",
    "    num_filters = w.shape[3]\n",
    "\n",
    "    # Number of grids to plot.\n",
    "    # Rounded-up, square-root of the number of filters.\n",
    "    num_grids = math.ceil(math.sqrt(num_filters))\n",
    "    \n",
    "    # Create figure with a grid of sub-plots.\n",
    "    fig, axes = plt.subplots(num_grids, num_grids)\n",
    "\n",
    "    # Plot all the filter-weights.\n",
    "    for i, ax in enumerate(axes.flat):\n",
    "        # Only plot the valid filter-weights.\n",
    "        if i<num_filters:\n",
    "            # Get the weights for the i'th filter of the input channel.\n",
    "            # See new_conv_layer() for details on the format\n",
    "            # of this 4-dim tensor.\n",
    "            img = w[:, :, input_channel, i]\n",
    "\n",
    "            # Plot image.\n",
    "            ax.imshow(img, vmin=w_min, vmax=w_max,\n",
    "                      interpolation='nearest', cmap='seismic')\n",
    "        \n",
    "        # Remove ticks from the plot.\n",
    "        ax.set_xticks([])\n",
    "        ax.set_yticks([])\n",
    "    \n",
    "    # Ensure the plot is shown correctly with multiple plots\n",
    "    # in a single Notebook cell.\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Helper-function for plotting the output of a convolutional layer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_conv_layer(layer, image):\n",
    "    # Assume layer is a TensorFlow op that outputs a 4-dim tensor\n",
    "    # which is the output of a convolutional layer,\n",
    "    # e.g. layer_conv1 or layer_conv2.\n",
    "\n",
    "    # Create a feed-dict containing just one image.\n",
    "    # Note that we don't need to feed y_true because it is\n",
    "    # not used in this calculation.\n",
    "    feed_dict = {x: [image]}\n",
    "\n",
    "    # Calculate and retrieve the output values of the layer\n",
    "    # when inputting that image.\n",
    "    values = session.run(layer, feed_dict=feed_dict)\n",
    "\n",
    "    # Number of filters used in the conv. layer.\n",
    "    num_filters = values.shape[3]\n",
    "\n",
    "    # Number of grids to plot.\n",
    "    # Rounded-up, square-root of the number of filters.\n",
    "    num_grids = math.ceil(math.sqrt(num_filters))\n",
    "    \n",
    "    # Create figure with a grid of sub-plots.\n",
    "    fig, axes = plt.subplots(num_grids, num_grids)\n",
    "\n",
    "    # Plot the output images of all the filters.\n",
    "    for i, ax in enumerate(axes.flat):\n",
    "        # Only plot the images for valid filters.\n",
    "        if i<num_filters:\n",
    "            # Get the output image of using the i'th filter.\n",
    "            img = values[0, :, :, i]\n",
    "\n",
    "            # Plot image.\n",
    "            ax.imshow(img, interpolation='nearest', cmap='binary')\n",
    "        \n",
    "        # Remove ticks from the plot.\n",
    "        ax.set_xticks([])\n",
    "        ax.set_yticks([])\n",
    "    \n",
    "    # Ensure the plot is shown correctly with multiple plots\n",
    "    # in a single Notebook cell.\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Input Images\n",
    "\n",
    "Helper-function for plotting an image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def plot_image(image):\n",
    "    plt.imshow(image.reshape(img_shape),\n",
    "               interpolation='nearest',\n",
    "               cmap='binary')\n",
    "\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Plot an image from the test-set which will be used as an example below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADV5JREFUeJzt3X+oXPWZx/HPUzeNYKrmNtMYbextc0UJwabLEFYra1dt\nuAmB6D+SICUFaQoqrlB0xaKr+E9YbYqgVG80NC6tbTGVBAmubqhooJaMJv6Ku+uvG5twzZ0YoSkI\nadJn/5iTcqv3fGecc2bO3DzvF1xm5jznzHlyyOeemfmeO19zdwGI5wtVNwCgGoQfCIrwA0ERfiAo\nwg8ERfiBoAg/EBThB4Ii/EBQ/9DPnc2bN8+Hh4f7uUsglPHxcR0+fNg6WbdQ+M1sVNIDkk6T9Ki7\nb0itPzw8rEajUWSXABLq9XrH63b9st/MTpP0kKQVkhZLWmtmi7t9PgD9VeQ9/zJJ77j7e+5+TNKv\nJK0upy0AvVYk/OdJ+uOUxweyZX/HzNabWcPMGs1ms8DuAJSp55/2u/uYu9fdvV6r1Xq9OwAdKhL+\ng5IWTnn81WwZgBmgSPh3S7rAzL5uZl+UtEbS9nLaAtBrXQ/1uftxM7tJ0n+pNdS32d3fLK0zAD1V\naJzf3XdI2lFSLwD6iMt7gaAIPxAU4QeCIvxAUIQfCIrwA0ERfiAowg8ERfiBoAg/EBThB4Ii/EBQ\nhB8IivADQRF+ICjCDwRF+IGgCD8QFOEHgiL8QFCEHwiK8ANBEX4gKMIPBEX4gaAIPxAU4QeCIvxA\nUIQfCKrQLL1mNi7pqKQTko67e72MpgD0XqHwZ/7F3Q+X8DwA+oiX/UBQRcPvkp41s5fNbH0ZDQHo\nj6Iv+y9z94Nm9hVJz5nZ/7j7C1NXyH4pr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\nkg5I2i1prbvv62sjOcxsXFLd3SsfEzazf5b0Z0mPu/uSbNl/SDri7huyX5xz3f3fBqS3uyX9ueqZ\nm7MJZRZMnVla0tWSvq8Kj12ir2tVwXGr4sy/TNI77v6eux+T9CtJqyvoY+C5+wuSjnxq8WpJW7L7\nW9T6z9N3Ob0NBHefcPdXsvtHJZ2cWbrSY5foqxJVhP88SX+c8viABmvKb5f0rJm9bGbrq25mGvOz\nadMl6UNJ86tsZhptZ27up0/NLD0wx66bGa/Lxgd+n3WZu/+jpBWSbsxe3g4kb71nG6Thmo5mbu6X\naWaW/psqj123M16XrYrwH5S0cMrjr2bLBoK7H8xuJyU9pcGbffjQyUlSs9vJivv5m0GauXm6maU1\nAMdukGa8riL8uyVdYGZfN7MvSlojaXsFfXyGmZ2RfRAjMztD0nIN3uzD2yWty+6vk7Stwl7+zqDM\n3Jw3s7QqPnYDN+O1u/f9R9JKtT7xf1fSj6voIaevb0h6Nft5s+reJD2h1svAv6j12cj1kr4saaek\ntyX9t6ShAertPyW9Luk1tYK2oKLeLlPrJf1rkvZmPyurPnaJvio5blzhBwTFB35AUIQfCIrwA0ER\nfiAowg8ERfiBoAg/EBThB4L6f6yMEem39pFEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339d11240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "image1 = data.test.images[0]\n",
    "plot_image(image1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Plot another example image from the test-set."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADihJREFUeJzt3X+I3PWdx/HXW00RbJBoxmWx0a1FDpbgpTIsBxHN0Wux\nWo1BDI0QIkq2Y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tHXUhVw3Io48w9I\netfd33P3P0v6haTFBfTR8dz9ZUkffWHxYklbsttbNPWPp+2q9NYR3H3c3V/Pbn8s6cTM0oUeu0Rf\nhSgi/OdL+sO0+4fUWVN+u6TfmNkeMxssupkZ9GTTpkvSB5J6imxmBjVnbm6nL8ws3THHrpEZr/PG\nBb+TXebul0r6rqRV2dPbjuRTr9k6abimrpmb22WGmaX/qshj1+iM13krIvyHJc2bdv9r2bKO4O6H\ns99HJT2tzpt9+MiJSVKz30cL7uevOmnm5plmllYHHLtOmvG6iPDvlnSxmX3dzL4i6fuSthXQx0nM\n7KzsQozM7CxJ31HnzT68TdKK7PYKSc8U2Mvf6JSZm6vNLK2Cj13HzXjt7m3/kXSVpq74/5+ke4ro\noUpfF0n6n+znjaJ7k/SEpp4GfqqpayO3SDpX0g5J70j6T0nndFBv/yHpgKT9mgpab0G9Xaapp/T7\nJe3Lfq4q+tgl+irkuPEOPyAoLvgBQRF+ICjCDwRF+IGgCD8QFOEHgiL8QFCEHwjq/wHi31d/HSnF\nFwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6334ae6518>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "image2 = data.test.images[13]\n",
    "plot_image(image2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Convolution Layer 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now plot the filter-weights for the first convolutional layer.\n",
    "\n",
    "Note that positive weights are red and negative weights are blue."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAADuCAYAAABf005JAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEGVJREFUeJzt3X1wlfWZxvH7ybsJ5AWSCJEkp9mA8rIQPVGrZbeORY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9xjYvMoKIi\n+/MZM3RwyxYZubhihWtmhid33XWutZKe84iYIZ61xo3zzVy6VGemTNGZDRtc47ijBACBogQAgaIE\nAIGiBACBogQAgaIEAIGiBACBogQAgaIEACEIQ/1V/38IB0G7mR0duJczoMrDMCyK+kVcDtd24Fzh\n19aM6zuQXNc2oaIEgE8jPnoDgEBRAoBAUQKAQFECgEBRAoBAUQKAQFECgEBRAoBAUQKA8N/PuYmu\nPeDeZgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6334ba5da0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_weights(weights=weights_conv1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Applying each of these convolutional filters to the first input image gives the following output images, which are then used as input to the second convolutional layer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAADuCAYAAABf005JAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztvelv1Wd6//86hmBjY8cbEGww2CzBTgIhhCRkI8kok0wy\n0ajTzHSUdlRpuo7UVmqfVFVVqX9B1UpV1fbBdDTpjObbJZnJNJpptkIIgQk7hEAAE4MNweANL8f7\nOb8Hn9/7+hyvn2M4x8vx9Xpi4hybw3Xuz3W/r+W+7lgymcRxHMeZmry5fgOO4zjzHXeUjuM4Ebij\ndBzHicAdpeM4TgTuKB3HcSJwR+k4jhOBO0rHcZwI3FE6juNE4I7ScRwngqUzeXFlZWVyw4YNWXor\n2aWpqYm2trbYXL+PqXDbZo+FbFuAo0ePtiWTyZVz/T6mYiHbN921OyNHuWHDBg4fPnz772oO2bVr\n11y/hWnZsGEDR44cmeu3cVs8/PDDc/0WpmUh2xYgFotdnuv3MB0L2b7prl0PvR3HcSJwR+k4jhOB\nO0rHcZwI3FE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fwSCHKWut1VuUpFntpn1T1EDBH7yk58AwRi1b3zjGwBWMezv7/ees9tAI+k0KOD48eMW\nquzcuRMIOgp8E0qPvr4+K+LorifdZtnZ2WnT+nWvU21trYXYWr8eck9NPB43O2mzEe3t7fzzP/8z\nEPZX19fX21yCzZs3A5NP7s8G/sQ4juNEMOuKUv18Z86cAYKpKrraQZ31U10P4UyOVKNsql6zpqYm\na11RuK2+VCeaeDxutlV7j4oHfX19FlarkLBs2TJXkjMgPz9/ymf98uXL/O///i8QnqV/6aWX5uwa\nGFeUjuM4EcyaolTDsxLgKtwkk0l27doFhPPknPQZGBiw2xR1Ckd54Pr6estNaid2RZk+RUVFbNu2\nDQivF1Ae/YsvvrC5nirgFBUV+azUGTBdE35tba017auFaO3atdaSNdu4onQcx4lg1hSlcja6dEkN\nuU8//bTt1s7M6erqMgWpI6BS60uWLOHFF18EMNXupE9paemUl6zde++9NnVf55QHBwf9qGKGKCsr\ns7PeymNu27ZtwnXXs8WsOMp4PG7tFTrDqRvV3EneGYWFhVYEU9uPQpb6+noLHZ3MM741xZ1kZtHw\nFtm1oaFhzobjeOjtOI4TQUxnrtN6cSx2E7icvbeTVdYnk8mVc/0mpsJtmz0WuG3B7ZtN0rLtjByl\n4zjOYsRDb8dxnAjcUTqO40TgjtJxHCcCd5SO4zgRuKN0HMeJwB2l4zhOBO4oHcdxInBH6TiOE4E7\nSsdxnAj+P9VNNSIcvuqDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f63392957b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_layer(layer=layer_conv1, image=image1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following images are the results of applying the convolutional filters to the second image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAADuCAYAAABf005J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5XHF7yZ220E+Hf/qnfwIA\n/Nu//duE8+YBQyRNTtxyHunt7ZXkD895ou2TgbreiqIoNqREUdLF4Az//Plz6R7EWj9rsJs1UTwx\n7dq1a7KCU+0w0eOUxM2LoCrhyhqNRkWZ0N6si+zt7ZVVmTtGCgoKJFHDcAbdyqamJseWqcyUTZs2\nifpmOUosFks4Pum281FtHQ/V9l/+5V+Kh5So/I/Jtby8PEmScTdaMnfrqaJUFEWxIaUbpDmjV1VV\nybEQjK0x8PrkyROJsTH+s3fvXlGek8uJFAOqkYKCgglHFwBmK/zBwUEpmWDR7rJly0R5JjPY7WSm\nq1z4OTm9JGi6JFKS3H3GeaSurk6Smpxjkol+YoqiKDbMScudzMzMuK13VDoul0uUDWMSFRUVcYWi\nGs+ZGpfLJYX3VJQs7s/Pz5di6Oke5qYoC5VoNCpKkuOZ8cjCwsKUdomfs95kvEGZXODuGiV50MZO\n2fuuOIuMjIwZn8yYtP89L/9VURRlEeGaSZLE5XL1AXiaustJKTWxWGx6Rz7OA2rb1LHIbQuofVPJ\ntGw7o4lSURTFiajrrSiKYoNOlIqiKDboRKkoimKDTpSKoig26ESpKIpig06UiqIoNuhEqSiKYoNO\nlIqiKDboRKkoimLD/wOiM0RW41gr2AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339d11630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_layer(layer=layer_conv1, image=image2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Convolution Layer 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now plot the filter-weights for the second convolutional layer.\n",
    "\n",
    "There are 16 output channels from the first conv-layer, which means there are 16 input channels to the second conv-layer. The second conv-layer has a set of filter-weights for each of its input channels. We start by plotting the filter-weigths for the first channel.\n",
    "\n",
    "Note again that positive weights are red and negative weights are blue."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVMAAADuCAYAAACEaORrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt4VOW1P/A1uUOGkMsAISSwoRGppWA1Smop5fAg9rQc\nUIsQMVIOpYiCivxyBC0H0IdSLxStYlGk1B8FvFGliJfDoUApR9EGRQSNEHEMCIEMSQi5k2SfPyQ8\nnrPW2pN5XJnf48/v58/vznK/m5ksJ7Pf/b4+13UJAAC+mpj/1wMAAPj/AZopAIABNFMAAANopgAA\nBtBMAQAMoJkCABhAMwUAMIBmCgBgAM0UAMBAXCQ/HEhPd53sbJbXNieoNX5fnXygpEStafzO5Sz7\n/PMgVVWFfOFH+dUEUlNdJyuLHzh2TC/q0kXOc3L0mk8+YVGwvp5CTU2df42xsa4TH88PaNdBRHur\nB4h5//76cJOS5Pyjj/aGXNft4TlIA4G0NPG1bCD9Ors0VcsHzp5Va07E8de5ujpIdXVReL9mZLiO\n8D6rrNF/tZua5Lx3z1a15sSpWJZF6xqJiPz+gJuR4bC8VR8yxfIhExFRj/rP1JrajH4sKy8PUnV1\n+OuMqJk62dlUvGULy3cF+6o1I5LekQ8MG6bWHHqpmGXXX58XfoAGnKwsKl63jh+YP18vGjxYzpct\n02smTGBR3o4dYUZnw4mPp+K+wmumXQcR+V7eIOZLligdk4gGDZLzyy/36e9mQ05WFhU/+yzL99MQ\ntWZIcLN8YOdOteb+1OUse+qpKL1fc3KoePt2lm94I12tKS2V84VzatSa+x9NYVm0rpGIKCPDoV/9\niveFqiq9Ji1NzmcUz1BrdhWu4j8/o2PXiT/zAQAMoJkCABhAMwUAMBDRd6YNrQm0v5p/1zZiz0Nq\nTem8eWKee9FFas3ASd9jWdKRjzswQgOff060YAGLj/3nf6ol2YGAfGDfPv08c+bw7MMPw43ORvfu\nRGPHsnj/VP7dX7vee+R8ctwL+nk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AYALNFADAAJop\nAIABNFMAAANopgAABiK6m3/uHNGxYzwfPFivOVKsLGiyZZA+qPx8lvk++CDc8Ez4Lr6cktYIC1HX\nKgvNElG6sJgGERF5LWgtLarstaKvJZ9PvAsa9y//otdIi8945US0Stme4FnPwdnZ/3Ei9R3J70KX\nbdmvF82ZI8YTrtbnk0glNXdGZ6Fv6t+faNUqnv/oR3qNsjL7wGPyYjZERIdW8Pd/XL2ykn0nqE3N\npl1jH2K5x9uPLsmXt8CYNvhuvWjkSJ5t3hxmdF/AJ1MAAANopgAABtBMAQAMoJkCABhAMwUAMIBm\nCgBgIKKpUdnZREVFPFcXMyEiWrBEzjMy1JJdD77FstoZ0ZlqEhenTLfYo6/mMi1J3u9nzezH9BNJ\n+y1VVIQZnY3qxF60OZcv6DDOYzEPuvlmOfeYm+L/05/kAx57TVm6+GKiv/xFOHAgqNacXCTvG7T1\nP/jeZxe3aZYMAAAAwElEQVR8yqeALWw6FWZ0Rg4fJho7lucei+yUKAvaHNrrsXBJUjbPEhLCjc6M\n/8h+GlHYlx9QpnkREdEbb8j5e+/pNdIiOK2t3oM7D59MAQAMoJkCABhAMwUAMIBmCgBgAM0UAMCA\nz3U7viGIz+erICJh74Co6Oe6bo/OPgmuMSq+CdeJazT0dbjOiJopAADI8Gc+AIABNFMAAANopgAA\nBtBMAQAMoJkCABhAMwUAMIBmCgBgAM0UAMAAmikAgIH/BkJomYa+y8y2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339d2b7f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_weights(weights=weights_conv2, input_channel=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There are 16 input channels to the second convolutional layer, so we can make another 15 plots of filter-weights like this. We just make one more with the filter-weights for the second channel. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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nETnAZkpE5ACbKRGRA2ymREQOJPRt/qFDZ/HQQ7Ui3/Sd/maN5xkHBg40azqNHSGytP32t8YupQPo\nqR2oqDBr9hv5tp/8xKy5/fvfl6GyAG+baGkBYjER33qjPWWiNqL//jd1sBfATtG+SQcQeifO+Fxp\nbFR/p7vGytkirfpDn5ny6P+0t0S/8UaZ1WxI0mLmh7Zi9EPyMSj43vfsonL52APA/gHGgj0A5kfl\nDIDjmRviD9CVaBSYNEnmc+bYNcbsmIo75GLerbrlKjuAXOBUIr4zJSJygM2UiMgBNlMiIgfYTImI\nHGAzJSJygM2UiMiBhKZGdeyYiuHD80T+0EN2zfUVq/QD9wcUvfyyzPZbE5Dcarr0OuxbIPfnjgb8\nptY06lNtnnvE3odnyRq5EEUs4zfxB+jCuXOfTRv6C8UD5WPbat06Pc/73e/s87z7rp6/k5y5UZW5\nxVg0XO48Vc1GAAAA2ElEQVRTdF+pPTWqbJLcNx0A5k342D7R1KkimlVp7CXlmA+gRTvQU53gBwAY\nsuk5Nd+QJhcSafXw7tkie63R/nnXarpehlWT14p85J0Bi5D89KdqnFtgT+fDwYMya1F/wwLfmRIR\nOcBmSkTkAJspEZEDbKZERA6wmRIRORDyfXsBB/HDoVAlAOXrrqQo8n2/S1ufhNeYFF+G6+Q1OvRF\nuM6EmikREen4Zz4RkQNspkREDrCZEhE5wGZKROQAmykRkQNspkREDrCZEhE5wGZKROQAmykRkQP/\nCbwTyk8Td2ZOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339d2bcf8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_weights(weights=weights_conv2, input_channel=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It can be difficult to understand and keep track of how these filters are applied because of the high dimensionality.\n",
    "\n",
    "Applying these convolutional filters to the images that were ouput from the first conv-layer gives the following images.\n",
    "\n",
    "Note that these are down-sampled to 14 x 14 pixels which is half the resolution of the original input images, because the first convolutional layer was followed by a max-pooling layer with stride 2. Max-pooling is also done after the second convolutional layer, but we retrieve these images before that has been applied."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVMAAADuCAYAAACEaORrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXucVOV5x78zy+4isCBxRRBhF1FRVECokaj1lsR7tN4v\nDSYxabw0GquxBq3Jx1xsY2tMW01T0jZ+1IZ6i0mMwRtRUFCiRCPiHV0w2ACLNwwU2N3pH/v5nfc9\nhzOzMztnzpzV5/vPzp45M3Pe857znuf+5AqFAoZhGEZ15Ot9AIZhGB8GbDE1DMNIAFtMDcMwEsAW\nU8MwjASwxdQwDCMBbDE1DMNIAFtMDcMwEsAWU8MwjASwxdQwDCMBBlWyc2tra6G9vb2sfeMyq3K5\nXCU/F6Kjo4POzs7+f0GZVDLGpPkojBFg6dKlnYVCYcda/47G6V+L3d3dAPT09ADummxoaAj2yeer\nlzGyNJelshwHwj0JbpyaN3BzGJ2vuPFqn/6Mt9xxVrSYtre3s2TJktCFV4wtW7a4HxnU+zOlLtIP\nPvgAgK1btwIwZMiQ4L3m5mb+7M/+rJJD7Tft7e08/fTToW2dnZ0AtLa21ux3u7u7OeCAA2r2/T5x\nY/y///s/wF1szc3NRT+vi1ULE7i5jc5xV1dX8FrXQS6XW9nfY68EjXPz5s3BtieeeAKABx98EIDX\nXnsNCM/tuHHjANh+++0BaGxsDN4bOXIkAJMnTwZg0qRJwLbjTut6HT9+PAsWLOCdd94JtrW0tABu\nsVm3bh0Ab7/9drCP7k/N8/Dhw4P3tG3jxo2h/z/2sY8F+wwfPpyZM2cmO5gStLW1sWjRomAsPrp2\nn3zySQCWLVsWvKdj11xq/gB23nnn0HvbbbcdEL4WWltb+cQnPlHWMZqabxiGkQC2mBqGYSRARWp+\nV1cX69evD1RxgLFjx8bu29TUVNGBSGVcvXo1ALvsskvwXimVMw3eeOMNADZs2ADAhAkTEv+NamxX\nSTB48OCy99WxrlmzJtgmNVNqr8w27777brCPr2KliX/9HHbYYYBT7f75n/8ZgOeffz7Yp6OjA4Ch\nQ4cC4XGuXbsWgD322AOACy+8EICjjz66BkfeN1u3bmXNmjW8/PLLwTaZyEaPHh3631fTn3nmGSD+\nftPY3n//fYDATCJ1Gnrv7zQrzuVyOZqbm0PHGUXj800emvsddtgBCNvG33vvPQCeffbZ0P8HHnhg\nsM/BBx8cstOWwiRTwzCMBKhYMn377bcDoz3AH//4RwDGjBkDwIgRIwD3VC8XfU5PP0kOWUCG++XL\nlwPOIbX//vsX/YwvvfsOjGIk4UGuBh1vOccqZPAH55TaccdeJ70cPb4jce+99676OJNi2rRpAPzk\nJz/Z5j2dC0kxDz30UPDe1VdfDcC9994LOM1s1113DfaRZJcGDQ0NjBgxInS/SJKUJjBq1KhtPlft\nMW7evLnu2lQUSaYXXXRRWfsvWLAAgGuvvRaA3//+9wBceumlwT577713yIlaCpNMDcMwEqAiybSx\nsZHRo0cHkhnA4sWLAReGMWPGDKDX1tAfdtppp359rpbstttuAKxfvx6AJUuWAITsVJK6JKnfdddd\nwXsHHXQQAOeee27tD7YCXnnlleC1pJeoRiA7EjjtQcjWBHDGGWcAzvY9f/58AD71qU8F+/jhN1km\nKp0fddRRwWvZTG+++WbASa++PXHz5s2p2RNzuRyDBg0KzZvuzzlz5gBO4tL1C85Gqs99/OMfD947\n9thjgbCNNUpzc3OqkmmhUGDLli3cfffdwbZbb70VgMMPPxyAyy67DAjbvzVPksTPP//84D1dz3vu\nuSfg7Me+5v3222+HQgBLYZKpYRhGAlQkmTY0NLD99tsH0ic46eSll14C4KmnngLcUxHcSi+7km9f\n0lNBNlc9ZbKEnt56mvv2UKHx33777QD84he/CN576623ADe2WkQDVII8wJKyoLgNLSqNAtx///2A\nC+oG2GeffQCnqUh69yVTBZOnSaFQSFSCUjC+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RP0lDgfmS3C6//PJt9peW\nonTcLHVRKIWfZKGEhYsvvrjmv2uSqWEYRgJU/aiR1Cbvr570fhEQv7BJFBUuUGpl1iQZcNKMbL/q\nHeP33pFErqe3HyitwikaWxZsh1HJXzVK/d5VlRCt3K5z4/9OFrSNaJqr+v/MmjWr6GckpUPlQeNZ\nQB0DfIn1C1/4AuB6PykhA1xkiu7JLCdb+LzxxhuAGy+4BJNyNaxqqP9dbRiG8SHAFlPDMIwESEzN\nV2iTjNxHHnlkWZ+XSF6sUk0WkKNphx12AFx4RZxJQuNX5SFwRnBVvEmz3mUtkEroG/oV6D59+nQg\nvn5DFsYtNV3mDIXg+aqhHC8y2fh1WFWhKAsmi2LIGfjMM88A7rqbNm1asI//OsqKFSsAN+40mz1W\ng8Lc/EaV5TSITAqTTA3DMBIgV4m0kMvl1gEra3c4JWkrFArld+3rJzbGVPgojNPGmCADYZwVLaaG\nYRhGPKbmG4ZhJIAtpoZhGAlgi6lhGEYC2GJqGIaRALaYGoZhJIAtpoZhGAlgi6lhGEYC2GJqGIaR\nALaYGoZhJMD/A/8aY2yG4odpAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6337ce2a90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_layer(layer=layer_conv2, image=image1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And these are the results of applying the filter-weights to the second image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVMAAADuCAYAAACEaORrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXeYJHWZxz/VM5tgl7RLUMKOAktmYZWc4wICkrPIwSMI\nd6eIgiei8oiCeCTlgEORU1Y8JUnOyURaliw5LDnsICC7wIbpuj/m+Va9VVNdUz1T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zJJIxciRIyt7\n0wdBMKADa6O3+uKLLx59LlIDUzbIF154AUimYraj51UQBAnJQ/eRIil031r7tyQ6Sdc2fVrj0nlR\nBXcbwN4Oic0+kzoWSajywttkG92Dqs1ro2nsNbPYMbbrmbQRBXqedL3ytElFEEnqhqT2WAYumTqO\n45SAT6aO4zglMCQ136rgCneS+C0Drw3QlppVpMXDe++9l9gn/Xudim2uNxhSMdsZBF2r1QY0DoP8\nPOUiqIqYVHrrrBrudw8Vq/7puOS8kHPGhszoOKXKW9OV2h3LwdpuJ0wWMtlIDdczqWcVmmuTo7q7\n1kzTTDuPMrH3rK6dnIAyx9gEGC1T2NTWW2/dumNr2Tc7juN8ggiaqfwSBMEs4MXWHU4uE8MwXLLV\nP+JjrIRPwjh9jCXycRhnU5Op4ziOk42r+Y7jOCXgk6njOE4J+GTqOI5TAj6ZOo7jlIBPpo7jOCXg\nk6njOE4J+GTqOI5TAj6ZOo7jlIBPpo7jOCXwf+1R9NvS3jKEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6339d117b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_conv_layer(layer=layer_conv2, image=image2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Close TensorFlow Session"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are now done using TensorFlow, so we close the session to release its resources."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [],
   "source": [
    "# This has been commented out in case you want to modify and experiment\n",
    "# with the Notebook without having to restart it.\n",
    "# session.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Conclusion\n",
    "\n",
    "This tutorial showed how to use the so-called *Layers API* for easily building Convolutional Neural Networks in TensorFlow. The syntax is different and more verbose than that of PrettyTensor. Both builder API's have advantages and disadvantages, but since PrettyTensor is only developed by one person and the Layers API is now an official part of TensorFlow Core, it is possible that PrettyTensor will become deprecated in the future. If this happens, we might hope that some of its unique and elegant features will become integrated into TensorFlow Core as well.\n",
    "\n",
    "I have been trying to get a clear answer from the TensorFlow developers for almost a year, on which of their APIs will be the main builder API for TensorFlow. They still seem to be undecided and very slow to implement it."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Exercises\n",
    "\n",
    "These are a few suggestions for exercises that may help improve your skills with TensorFlow. It is important to get hands-on experience with TensorFlow in order to learn how to use it properly.\n",
    "\n",
    "You may want to backup this Notebook before making any changes.\n",
    "\n",
    "* Change the activation function to sigmoid for some of the layers.\n",
    "* Can you find a simple way of changing the activation function for all the layers?\n",
    "* Add a dropout-layer after the fully-connected layer. If you want a different probability during training and testing then you will need a placeholder variable and set it in the feed-dict.\n",
    "* Plot the output of the max-pooling layers instead of the conv-layers.\n",
    "* Replace the 2x2 max-pooling layers with stride=2 in the convolutional layers. Is there a difference in classification accuracy? What if you optimize it again and again? The difference is random, so how would you measure if there really is a difference? What are the pros and cons of using max-pooling vs. stride in the conv-layer?\n",
    "* Change the parameters for the layers, e.g. the kernel, depth, size, etc. What is the difference in time usage and classification accuracy?\n",
    "* Add and remove some convolutional and fully-connected layers.\n",
    "* What is the simplest network you can design that still performs well?\n",
    "* Retrieve the bias-values for the convolutional layers and print them. See `get_weights_variable()` for inspiration.\n",
    "* Remake the program yourself without looking too much at this source-code.\n",
    "* Explain to a friend how the program works."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## License (MIT)\n",
    "\n",
    "Copyright (c) 2016-2017 by [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org/)\n",
    "\n",
    "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n",
    "\n",
    "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n",
    "\n",
    "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
